﻿namespace Services.Interface;

public partial interface IUserBLL : IBaseBLL<User>
{
    /// <summary>
    /// 用户列表分页
    /// </summary>
    /// <returns></returns>
    Task<List<UserVM>> QueryPageListAsync(UserQueryRM pageQuery, RefAsync<int> total);
    /// <summary>
    /// 查询用户通过账号
    /// </summary>
    /// <param name="account"></param>
    /// <returns></returns>
    Task<User> GetUserByAccountAsync(string account);

    /// <summary>
    /// 新增用户
    /// </summary>
    /// <param name="user"></param>
    /// <returns></returns>
    Task<ResultModel> AddUserAsync(User user);

    /// <summary>
    /// 修改用户
    /// </summary>
    /// <param name="user"></param>
    /// <returns></returns>
    Task<ResultModel> UpdateUserAsync(User user);

    /// <summary>
    /// 设置用户角色
    /// </summary>
    /// <param name="rm"></param>
    Task<ResultModel> SetUserRoleByIdsAsync(SetUserRoleByIdsRM rm);

    /// <summary>
    /// 设置用户状态
    /// </summary>
    /// <param name="rm"></param>
    Task<ResultModel> SetUserEnableByIdsAsync(SetEnableRM rm);

    /// <summary>
    /// 根据用户类型设置用户角色
    /// </summary>
    /// <param name="rm"></param>
    Task<ResultModel> SetUserRoleByUserTypeAsync(SetUserRoleByUserTypeRM rm);

    /// <summary>
    /// 获取教师树
    /// </summary>
    /// <returns></returns>
    Task<BDS_Tree?> GetTeacherTree(TreeRM rm);

    /// <summary>
    /// 学生树
    /// </summary>
    /// <returns></returns>
    Task<BDS_Tree?> GetStudentTree(TreeRM rm);

    /// <summary>
    /// 获取教师树
    /// </summary>
    /// <returns></returns>
    Task<List<User>> GetOtherList(TreeRM rm);

    /// <summary>
    /// 编辑用户角色
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task<ResultModel> UpdateUserRoleAsync(UpdateUserRoleInput input);
}
